package dq.jvm;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * @Author: Dang Qi
 * @Date: 2021/3/3  20:27
 * @Description:
 */
public class TestHeap {
    byte[] b = new byte[new Random().nextInt(1024 * 200)];
    public static void main(String[] args) {
//        List<TestHeap> list = new ArrayList<>();
//        while (true){
//            list.add(new TestHeap());
//            try {
//                Thread.sleep(10);
//            } catch (InterruptedException e) {
//                e.printStackTrace();
//            }
//        }
//        String a = "a";
//        change(a);
//        System.out.println(a);

        String s = new String("1");
        s.intern();
        String s1 = "1";
        System.out.println(s==s1);

        String s2 = new String("1") + new String("1");
        s2.intern();
        String s3 = "11";
        System.out.println(s2==s3);


    }
    public static void change(String s){
        s = "b";
    }
}
